<?php
	session_start();
	require("../inc/functions.php");
	if(!isEmployee())
		header("Location: ../index.php");
	require_once("../inc/models/products_model.php");
	$results = GetProduct($_REQUEST['id']);
?>

<!DOCTYPE html>
<html lang="en">
	<?php include('../inc/head.php'); ?>
	<body>
	<?php include('../inc/navigation.php'); ?>
			<div class="span9">
				<div class="row-fluid">
					<h2><?=$results['name'] ?></h2>
		                	<p><strong>I.D.: </strong><?=$results['id'] ?></p>
		                    <p><strong>Company I.D.: </strong><?=$results['Companies_id'] ?></p>
		                    <p><strong>Product Category I.D.: </strong><?=$results['product_category_id'] ?></p>
		                    <p><strong>SKU: </strong><?=$results['sku'] ?></p>
		                    <p><strong>Name: </strong><?=$results['name'] ?></p>
		                    <p><strong>Price: </strong><?=$results['price'] ?></p>
		                    <p><strong>Weight: </strong><?=$results['weight'] ?></p>
		                    <p><strong>Description: </strong><?=$results['description'] ?></p>
		                     <p><strong>Image:</strong></p>
		                    <p><img src="../inc/images/<?=$results['image']?>"/></p>
		                     <p><strong>Thumbnail:</strong></p>
		                    <p><img src="../inc/images/thumbnails/<?=$results['thumbnail']?>"/></p>
		                    <?php if($results['updatdate'] != NULL): ?>
		                    <p><strong>Updated At: </strong><?=$results['updatdate'] ?></p>
		                    <?php endif; ?>
		                   	<?php if($results['updatdate'] == NULL): ?>
		                   	<p><strong>Update At: </strong>Product was never updated.</p>
		                    <?php endif; ?>
				</div>
			</div>
		</div>
	</div>
	
	<!-- All Bootstrap JavaScript Files -->
	<script src="../inc/bootstrap/js/jquery.js"></script>
    <script src="../inc/bootstrap/js/bootstrap.js"></script>
	
	</body>
</html>
